import './assets/common.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import 'vant/lib/index.css'
import lazyPlugin from './directives/lazyLoading'

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(lazyPlugin)

// 设置动态fontSize
const rootValue = 16
// 设计稿屏幕宽度
const rootWidth = 390
//客户端用户屏幕宽度
const deviceWidth = document.documentElement.clientWidth
//
document.documentElement.style.fontSize = (deviceWidth * rootValue) / rootWidth + 'px'

app.mount('#app')
